home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / dbms_mag / 9107 / paradox1 < prev    next >
Text File  |  1991-05-25  |  2KB  |  62 lines

  1. LISTING 1.  A Ring Menu Proc
  2.  
  3. 1    ; ---------------------------------------------------------------------------
  4. 2    ; Traditional Paradox style menu
  5. 3    ; DBMS - Speaking of PAL - July, 1991 - Listing 1
  6. 4    ;
  7. 5    ; This procedure displays a Paradox style menu and allows
  8. 6    ; the user to select a menu choice.
  9. 7    ; ----------------------------------------------------------------
  10. 8    proc HORIZONTAL_MENU()
  11. 9       private  PROCNAME,
  12. 1                MENU.CHOICE             ; user selection from the menu
  13. 11
  14. 12      ; set default for 1st time through
  15. 13
  16. 14      MENU.CHOICE = "Enter"
  17. 15      while (true)
  18. 16
  19. 17         ; display menu and highlight default from the last time around
  20. 18
  21. 19         showmenu
  22. 20            "Enter"   : "Enter new customers",
  23. 21            "Update"  : "Update customer order volumes",
  24. 22            "Process" : "Process outstanding invoices",
  25. 23            "Reports" : "Generate summary reports",
  26. 24            "Archive" : "Archive old customers",
  27. 25            "Graph"   : "Graph customer credit information"
  28. 26         default MENU.CHOICE
  29. 27         to MENU.CHOICE
  30. 28
  31. 29         ; process user selection from the menu
  32. 30
  33. 31         switch
  34. 32            case MENU.CHOICE = "Enter" :
  35. 33               ENTER_CUSTOMERS()
  36. 34
  37. 35            case MENU.CHOICE = "Update" :
  38. 36               UPDATE_CUST_ORDERS()
  39. 37
  40. 38            case MENU.CHOICE = "Process" :
  41. 39               PROCESS_INVOICES()
  42. 40
  43. 41            case MENU.CHOICE = "Reports" :
  44. 42               SUMMARY_REPORTS()
  45. 43
  46. 44            case MENU.CHOICE = "Archive" :
  47. 45               ARCHIVE_CUSTOMERS()
  48. 46
  49. 47            case MENU.CHOICE = "Graph" :
  50. 48               GRAPH_CUST_CREDIT()
  51. 49
  52. 50            case MENU.CHOICE = "Esc" :
  53. 51               return
  54. 52
  55. 53         endswitch
  56. 54
  57. 55      endwhile
  58. 56
  59. 57   endproc
  60. 58
  61. 59   HORIZONTAL_MENU()
  62.